
namespace Qdb.Drs.Tests.Foundation
{
	public class ObjectSetCollection4FacadeTestCase : QdbUnit.ITestCase
	{
		public static void Main(string[] args)
		{
			new QdbUnit.ConsoleTestRunner(typeof(Qdb.Drs.Tests.Foundation.ObjectSetCollection4FacadeTestCase)
				).Run();
		}

		public virtual void TestEmpty()
		{
			Qdb.Drs.Foundation.ObjectSetCollection4Facade facade = new Qdb.Drs.Foundation.ObjectSetCollection4Facade
				(new Qdb.Foundation.Collection4());
			QdbUnit.Assert.IsFalse(facade.HasNext());
			QdbUnit.Assert.IsFalse(facade.HasNext());
		}

		public virtual void TestIteration()
		{
			Qdb.Foundation.Collection4 collection = new Qdb.Foundation.Collection4
				();
			collection.Add("bar");
			collection.Add("foo");
			Qdb.Drs.Foundation.ObjectSetCollection4Facade facade = new Qdb.Drs.Foundation.ObjectSetCollection4Facade
				(collection);
			QdbUnit.Assert.IsTrue(facade.HasNext());
			QdbUnit.Assert.AreEqual("bar", facade.Next());
			QdbUnit.Assert.IsTrue(facade.HasNext());
			QdbUnit.Assert.AreEqual("foo", facade.Next());
			QdbUnit.Assert.IsFalse(facade.HasNext());
			facade.Reset();
			QdbUnit.Assert.AreEqual("bar", facade.Next());
			QdbUnit.Assert.AreEqual("foo", facade.Next());
			QdbUnit.Assert.IsFalse(facade.HasNext());
		}
	}
}
